import request from '@/utils/request'

export function listWxDraft(query) {
  return request({
    url: '/wxmp/wxDraft/list',
    method: 'get',
    params: query
  })
}

export function getWxDraft(id) {
  return request({
    url: '/wxmp/wxDraft/' + id,
    method: 'get'
  })
}

export function addWxDraft(obj) {
  return request({
    url: '/wxmp/wxDraft',
    method: 'post',
    data: obj
  })
}

export function delWxDraft(query) {
  return request({
    url: '/wxmp/wxDraft',
    method: 'delete',
    params: query
  })
}

export function editWxDraft(obj) {
  return request({
    url: '/wxmp/wxDraft',
    method: 'put',
    data: obj
  })
}

export function publish(id) {
  return request({
    url: '/wxmp/wxDraft/publish/'+id,
    method: 'post'
  })
}
